<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置元素的扩展比率</title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        .box{
            margin: 0 auto;
            width: 400px;
            height: 400px;
            margin-top: 100px;
            background-color: bisque;
            list-style-type: none;
            padding: 0;
            overflow:hidden;
            display: -webkit-flex;  
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: space-around;
            align-items: flex-start;
        }
        .row{
            width: 100px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            margin-top: 10px;
            background-color: rgb(102, 240, 203);
        }
        #item1{
            background-color: red;
            flex-grow:1;  /* 对剩余空间进行分配 */
        }
        #item2{
            background-color: rgb(124, 111, 237);
            flex-grow:1;
        }
        #item3{
            background-color: rgb(241, 96, 200);
            flex-grow:10;
        }
    </style>
</head>
<body>
    <div>
        <ul class="box">
            <li id="item1" class="row">弹性盒子1</li>
            <li id="item2" class="row">弹性盒子2</li>
            <li id="item3" class="row">弹性盒子3</li>
        </ul>
    </div>
</body>
</html>